home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 18 / AMIGAplus Sonderheft 18 (1999)(ICP)(DE)[!].iso / PD / Anwendungen / FS1541-13 / volume.h < prev   
C/C++ Source or Header  |  1999-01-03  |  2KB  |  96 lines

  1.  
  2. /*
  3.  * FS1541 - volume, BAM and lock handling (header)
  4.  *
  5.  * Copyright (C) 1996 - 1998 Michael Krause
  6.  *
  7.  * This program is free software; you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License as published by
  9.  * the Free Software Foundation; either version 2 of the License, or
  10.  * (at your option) any later version.
  11.  *
  12.  * This program is distributed in the hope that it will be useful,
  13.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.  * GNU General Public License for more details.
  16.  *
  17.  * You should have received a copy of the GNU General Public License
  18.  * along with this program; if not, write to the Free Software
  19.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  20.  */
  21.  
  22. #include <dos/dosextens.h>
  23.  
  24. LONG InitVolumeSS(void);
  25. void QuitVolumeSS(void);
  26. void DoDiskInsert(void);
  27. void DoDiskRemove(void);
  28.  
  29. UWORD Block2TS(UWORD blk);
  30.  
  31. UWORD AllocBlock(UBYTE fromt, UBYTE froms);
  32. void FreeBlock(UBYTE t, UBYTE s);
  33. UWORD UsedBlocks(void);
  34.  
  35. void OptimizeDirectory(void);
  36.  
  37. void StartUDSTimer(void);
  38. void StopUDSTimer(void);
  39. void UpdateDiskStructure(void);
  40.  
  41. BPTR makelock(LONG flkey, LONG axs);
  42. void freelock(struct FileLock *fl);
  43. BOOL lockable(UBYTE t, UBYTE s, LONG mode);
  44.  
  45.  
  46.  
  47. extern BYTE diskchgintbit;
  48. extern struct VolumeNode *curvolumenode;
  49. extern struct DosList *curdoslist;
  50. extern int disk_inserted;
  51.  
  52. extern struct timerequest *UDStimer;
  53.  
  54. extern struct BAM *bam;
  55. extern struct DirEntry directory[144];
  56. extern int dirsize;
  57.  
  58. extern UBYTE interleave;
  59.  
  60. struct VolumeNode {
  61.     struct MinNode node;
  62.     struct DosList *volnode;
  63.     struct FileLock *locklist;
  64.     UBYTE name[30];    /* this is a BCPL string */
  65.     ULONG dollarlen;
  66.     UBYTE dollarbuf[30*(144+2)];
  67. };
  68.  
  69. struct BAM {
  70.     UBYTE dirt,dirs;
  71.     UBYTE id;
  72.     UBYTE dside;
  73.     ULONG tracks[35];
  74.     UBYTE name[16];
  75.     UBYTE pad1[2];
  76.     UBYTE name2[5];
  77.     UBYTE pad2[89];
  78. };
  79.  
  80. struct DirEntry {
  81.     UBYTE t,s;
  82.     UBYTE type;
  83.     UBYTE datat,datas;
  84.     UBYTE name[16];
  85.     UBYTE relsst,relsss;
  86.     UBYTE rellen;
  87.     UBYTE pad[4];
  88.     UBYTE tmpdatat,tmpdatas;
  89.     UBYTE lengthl,lengthh;
  90. };
  91.  
  92. struct DataBlock {
  93.     UBYTE t,s;
  94.     UBYTE data[254];
  95. };
  96.